//Name:
//Purpose:
//Author: wjy
//Date: 2022-01-10 15:50:51
//From:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    int a1, a2, a3, a4;
    int max, min;
    printf("Enter four integers: ");
    scanf("%d %d %d %d", &a1, &a2, &a3, &a4);
    max = a1;
    if (max < a2)
    {
        max = a2;
    }
    if (max < a3)
    {
        max = a3;
    }
    if (max < a4)
    {
        max = a4;
    }
    min = a1;
    if (min > a2)
    {
        min = a2;
    }
    if (min > a3)
    {
        min = a3;
    }
    if (min > a4)
    {
        min = a4;
    }
    printf("Largest: %d\n", max);
    printf("Smallest: %d\n", min);
    system("pause");
    return 0;
}